File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1418,7 +1418,7 @@ export async function resolveConfig(
1418
1418
inlineConfig,
1419
1419
root : resolvedRoot ,
1420
1420
base,
1421
- decodedBase : decodeURI ( base ) ,
1421
+ decodedBase : decodeBase ( base ) ,
1422
1422
rawBase : resolvedBase ,
1423
1423
publicDir : resolvedPublicDir ,
1424
1424
cacheDir,
@@ -1678,6 +1678,16 @@ export function resolveBaseUrl(
1678
1678
return base
1679
1679
}
1680
1680
1681
+ function decodeBase ( base : string ) : string {
1682
+ try {
1683
+ return decodeURI ( base )
1684
+ } catch {
1685
+ throw new Error (
1686
+ 'The value passed to "base" option was malformed. It should be a valid URL.' ,
1687
+ )
1688
+ }
1689
+ }
1690
+
1681
1691
export function sortUserPlugins (
1682
1692
plugins : ( Plugin | Plugin [ ] ) [ ] | undefined ,
1683
1693
) : [ Plugin [ ] , Plugin [ ] , Plugin [ ] ] {
You can’t perform that action at this time.
0 commit comments